<?php
	class Admin_Model_News extends Zend_Db_Table_Abstract{
		protected $_name = 'news';
		protected $_id = 'id';
		protected $_dependentTables = array('Admin_Model_News');
		
		public function getAll(){
			$select = $this->select()
						->where('isDeleted = 0');
			$result = $this->fetchall($select);
			//print_r($result->toArray());exit;
			//$system = new My_System_Recursive($result->toArray());
			//$result = $system->buildArray(0);
			
			return $result->toArray();
		}
		public function addItem($data){
			try{
				$id = $this->insert($data);
				return $id;
			}
			catch (Exception $e){
				throw $e;
			}
		}
		
		
	}

?>